<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>category</title>
    <link rel="StyleSheet" href="../css/catalog.css" type="text/css" media="screen" />
    <link rel="StyleSheet" href="../css/common.css" type="text/css" media="screen" />
    <script src="/js/jquery-3.6.0.min.js"></script>
<!--    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>-->
</head>
<body>
<div th:replace="common/top1"></div>
<div id="w">
    <div id="BackLink">
        <a href="/index">Return to Main Menu</a>
    </div>
    <div id="Catalog">

        <div th:if="${category.name} != null">
            <div th:text="${category.name}" id="petName"> category的name属性 </div>
            <table class="showGoods">
                <tr id="head">
                    <th></th>
                    <th>Product ID</th>
                    <th>Name</th>
                </tr>
                <tr th:each="product:${productList}">
                    <td><img th:src="${product.descn}"></td>
                    <td>
                        <a class="catalogTableLink" th:href="@{/productForm(productId=${product.productid})}" th:text="${product.productid}">productId</a>
                    </td>
                    <td th:text="${product.name}">product name</td>
                </tr>
            </table>
        </div>

        <div th:if="${category.name} == null">
<!--        <div  id="petName"> category的name属性</div>-->
<!--            <table class="showGoods">-->
<!--                <tr id="head">-->
<!--                    <th>Product ID</th>-->
<!--                    <th>Name</th>-->
<!--                </tr>-->
<!--                <tr>-->
<!--                    <td>-->
<!--                        <a class="catalogTableLink" href="productForm?productId=${product.productId}">productId</a>-->
<!--                    </td>-->
<!--                    <td >product name</td>-->
<!--                </tr>-->
<!--            </table>-->
<!--        </div>-->
            获取失败请重试
        </div>
    </div>
</div>
<div th:replace="common/bottom"></div>
<script src="../js/searchBykeyWord.js"></script>
</body>
</html>